Cytosim  PI
Cytoskeleton Simulator
How to create objects

Modules

 How to create a Bead
 
 Couple and Derived Activities
 A Couple contains two Hand, and can thus crosslink two Fibers.
 
 Fiber and Derived Activities
 The default Fiber is of fixed length, but derived class can change length.
 
 How to create a Field
 
 Hand and Derived Activities
 A Hand can bind to a Fiber, and derived class can do more things.
 
 How to create an Aster
 
 Single and Derived Activities
 A Single contains one Hand, and can thus bind to one Fiber.
 
 How to create a Solid
 
 Space and Geometry
 A Space define a confined region.
 
 How to create a Sphere
 

Detailed Description

The command new creates one or more objects with given specifications:

new [MULTIPLICITY] CLASS NAME
{
position = POSITION
orientation = ROTATION
post_translation = VECTOR
post_rotation = ROTATION
mark = INTEGER
required = INTEGER
}

The possible values of CLASS are in the List of objects.
The NAME should have been defined previously in the same class with set.
The other parameters are:

Parameter type Description
MULTIPLICITY INTEGER the number of objects, by default 1.
orientation ROTATION a rotation applied before translation
position POSITION a translation
post_translation VECTOR a translation applied every time after one object is created
post_rotation ROTATION a rotation applied every time after one object is created
mark INTEGER this mark is given to all objects created (default = 0).
required INTEGER cytosim will stop if it cannot create as many objects as specified (default=0)

Note that position only applies to movable objects, and orientation only applies to rotatable objects. In addition, post_translation and post_rotation are relevant only if (MULTIPLICITY > 1), and do not apply to the first object.

Short syntax:

new [MULTIPLICITY] CLASS NAME ( POSITION )

Shorter syntax:

new [MULTIPLICITY] CLASS NAME

POSITION

A position is defined with a SHAPE followed by a number of transformations.

Operation Transformation
at X Y Z Translate by specified vector (X,Y,Z)
add SHAPE Translate by a vector chosen according to SHAPE
align VECTOR Rotate to align parallel with specified vector
turn ROTATION Apply specified rotation
blur REAL Add centered Gaussian noise of variance REAL

A vector is set according to SHAPE, and the transformations are applied one after the other, in the order in which they were given.
Examples:

position = 1 0 0
position = circle 3 at 1 0
position = square 3 turn 1 1 0 at 1 1

SHAPE

Geometrical Primitives:

Keyword Position (X, Y, Z) / Remark
A B C The specified vector (A,B,C)
X=A, Y=B, Z=C
inside A random position inside the current Space
edge E At distance E from the edge of the current Space
surface E On the surface of the current Space
The point is generated by projecting a point at distance E from the surface.
sphere R T A distance R +/- T/2 from the origin
R-T/2 < norm(X,Y,Z) < R+T/2
ball R At distance R at most from the origin
norm(X,Y,Z) < R
disc R T in 2D, a disc in the XY-plane
in 3D, a disc in the XY-plane of thickness T in Z
circle R T A circle of radius R and thickness T
At distance T from the circle of radius R
cylinder T R Cylinder of axis X, R=radius in YZ and T=thickness in X
ellipse A B C Inside the ellipse or ellipsoid of main axes 2A, 2B and 2C
arc L Theta A piece of circle of length L and covering an angle Theta
stripe L R Random Vector with L < X < R
square R Random Vector with -R < X < R; -R < Y < R; -R < Z < R;
rectangle A B C Random Vector with -A < X < A; -B < Y < B; -C < Z < C;
gradient S E Provides a linear density gradient, from 0 at X=S to 1 at X=E

The primitive describe a certain area in Space. Except when specified (gradient), the returned position is chosen following a random distribution inside the area.

DIRECTION

The initial orientation of objects is defined by specifying a rotation.

A rotation can be specified in various ways:

Keyword Rotation / Result
random A rotation selected uniformly among all possible rotations
identity The object is not rotated
X Y Z A random rotation transforming (1,0,0) into (X,Y,Z)
horizontal
aligned_X
A rotation where (1,0,0) is invariant or transformed into (-1,0,0)
vertical
aligned_Y
A rotation that transforms (1,0,0) into (0,1,0) or (0,-1,0)
aligned_Z A rotation that transforms (1,0,0) into (0,0,1) or (0,0,-1)
aligned_XY
aligned_XZ
aligned_YZ
A rotation that transforms (1,0,0) into a unit vector in the specified plane
angle A B C As specified by 3 Euler angles in radians (in 2D, only A is needed)
degree A B C As specified by 3 Euler angles in degrees (in 2D, only A is needed)
quat q0 q1 q2 q3 As specified by the Quaternion (q0, q1, q2, q3)

If a Space is defined, one may also use:

Keyword Rotation / Result
tangent perpendicular to the normal of the Space
radial normal to the Space
centrifuge normal to the Space, directed outward
centripete normal to the Space, directed inward

Note: when the rotation is not uniquely determined in 3D (eg. horizontal), cytosim will pick uniformly among all the possible rotations that fulfill the requirements.

ROTATION

The initial orientation of objects is defined by specifying a rotation.

A rotation can be specified in various ways:

Keyword Rotation / Result
random A rotation selected uniformly among all possible rotations
identity The object is not rotated
X Y Z A random rotation transforming (1,0,0) into (X,Y,Z)
horizontal
aligned_X
A rotation where (1,0,0) is invariant or transformed into (-1,0,0)
vertical
aligned_Y
A rotation that transforms (1,0,0) into (0,1,0) or (0,-1,0)
aligned_Z A rotation that transforms (1,0,0) into (0,0,1) or (0,0,-1)
aligned_XY
aligned_XZ
aligned_YZ
A rotation that transforms (1,0,0) into a unit vector in the specified plane
angle A B C As specified by 3 Euler angles in radians (in 2D, only A is needed)
degree A B C As specified by 3 Euler angles in degrees (in 2D, only A is needed)
quat q0 q1 q2 q3 As specified by the Quaternion (q0, q1, q2, q3)

If a Space is defined, one may also use:

Keyword Rotation / Result
tangent perpendicular to the normal of the Space
radial normal to the Space
centrifuge normal to the Space, directed outward
centripete normal to the Space, directed inward

Note: when the rotation is not uniquely determined in 3D (eg. horizontal), cytosim will pick uniformly among all the possible rotations that fulfill the requirements.

See also List of objects.